package io.github.kouleen.manager.listener.player;

import io.github.kouleen.minecraft.core.lang.annotation.MinecraftPluginListener;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;

import java.net.InetAddress;

/**
 * 玩家登录的事件.
 * @author zhangqing
 * @since 2025/2/26 10:56
 */
@MinecraftPluginListener
public class PlayerLoginListener implements Listener {

    @EventHandler
    public void onPlayerLoginListener(PlayerLoginEvent playerLoginEvent){
        Player player = playerLoginEvent.getPlayer();
        System.out.println(player.getName() + "触发了玩家登录的事件");
        InetAddress inetAddress = playerLoginEvent.getAddress();
    }
}
